package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysregionMapper;
import com.ruoyi.system.domain.Sysregion;
import com.ruoyi.system.service.ISysregionService;
import com.ruoyi.common.core.text.Convert;

/**
 * sysregionService业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-28
 */
@Service
public class SysregionServiceImpl implements ISysregionService 
{
    @Autowired
    private SysregionMapper sysregionMapper;

    /**
     * 查询sysregion
     * 
     * @param KeyId sysregionID
     * @return sysregion
     */
    @Override
    public Sysregion selectSysregionById(Long KeyId)
    {
        return sysregionMapper.selectSysregionById(KeyId);
    }

    /**
     * 查询sysregion列表
     * 
     * @param sysregion sysregion
     * @return sysregion
     */
    @Override
    public List<Sysregion> selectSysregionList(Sysregion sysregion)
    {
        return sysregionMapper.selectSysregionList(sysregion);
    }

    /**
     * 新增sysregion
     * 
     * @param sysregion sysregion
     * @return 结果
     */
    @Override
    public int insertSysregion(Sysregion sysregion)
    {
        return sysregionMapper.insertSysregion(sysregion);
    }

    /**
     * 修改sysregion
     * 
     * @param sysregion sysregion
     * @return 结果
     */
    @Override
    public int updateSysregion(Sysregion sysregion)
    {
        return sysregionMapper.updateSysregion(sysregion);
    }

    /**
     * 删除sysregion对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysregionByIds(String ids)
    {
        return sysregionMapper.deleteSysregionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除sysregion信息
     * 
     * @param KeyId sysregionID
     * @return 结果
     */
    @Override
    public int deleteSysregionById(Long KeyId)
    {
        return sysregionMapper.deleteSysregionById(KeyId);
    }

    @Override
    public List<Map<String,Object>> selectByShangjiId (String shangjiid){
        return sysregionMapper.selectByShangjiId(shangjiid);
    };
}
